package com.admin.common.config;

import java.util.HashMap;
import java.util.Map;


import com.alibaba.druid.pool.DruidDataSource;
import com.alibaba.druid.spring.boot3.autoconfigure.DruidDataSourceBuilder;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;


import javax.sql.DataSource;

/**
 * Druid配置
 * 
 * @author ZY
 * @date 2018/12/22
 */
@Configuration
public class DruidConfig {

    @ConfigurationProperties(prefix = "spring.datasource.druid")
    @Bean
    public DataSource getDataSource() {
        return DruidDataSourceBuilder.create().build();
    }

}
